<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>经销商运营互动平台</title>
    <meta name="viewport" content="width=320.1, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <script src="http://onstar.adbaoheng.com/cz/yyhdloading/jquery.min.js"></script>
    <style>
        *{margin:0;padding:0}
        html,body{height:100%}
        .loadingHtml{background:url(http://onstar.adbaoheng.com/cz/yyhdloading/bg.png) no-repeat;background-size:100% 100%;width:100%;height:100%}
        .progressWrap{position:absolute;width:80%;height:1%;background:url(http://onstar.adbaoheng.com/cz/yyhdloading/2.png) no-repeat;background-size:100% 100%;left:50%;top:48%;transform:translateX(-50%)}
        .progressInside{background:url(http://onstar.adbaoheng.com/cz/yyhdloading/1.png) no-repeat;background-size:100% 100%;height:100%;width:10%;border-radius:15%}
        .car{width:1.2rem;position:absolute;top:-95%;left:0%;animation:move 1s linear infinite;}
        @keyframes move{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}
        .font{position:absolute;top:320%;left:42%;color:#008fe7;}
    </style>
</head>
<body>
<!-- 第一页 -->
<div class="loadingHtml">
    <div class="progressWrap"><img src="http://onstar.adbaoheng.com/cz/yyhdloading/car.png" alt="" class="car" /><div class="progressInside"></div><span class="font">Loading</span></div>
</div>
<script>
    const code = getLocationValue("code");
    const appid = getLocationValue("appid");
    const extattr = getLocationValue("extattr");
    const url = getLocationValue("url");
    clock = setInterval(getTimeVal, 55);
    var val = 0;
    function getTimeVal() {
        val += 2
        $("#progressNumber").html(val + "%");
        $(".progressInside").css('width', val + '%');
        $(".car").css('left', val + '%');
        if (val >= 98) {
            clearInterval(clock);
        }
    }
    $(function () {
        $.ajax({
            type: "GET",
            url: "/ajaxAuthInfo.do",
            data: {
                'code': code,
                'appid': appid,
                'extattr': extattr,
                'url': url,
            },
            dataType: "json",
            success: function (res) {
                window.location.href = res.data;
            }
        })
    })
    //获取location中指定值
    function getLocationValue(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return decodeURI(r[2]);
        return null;
    }
</script>
</body>
</html>